#ifndef RSIM_REPORTER_H
#define RSIM_REPORTER_H

/* -------------------------------------------------------------------------- *
 * File: Reporter.h                                                           *
 * Authors: Kishor Bhalerao                                                   *
 * Email : kishor8dm@gmail.com                                                *
 * Contributors:                                                              *
 * Email:                                                                     *
 * copyright (c) 2010 Authors.                                                *
 *                                                                            *
 * This program is free software: you can redistribute it and/or modify it    *
 * under the terms of the GNU General Public License as published by the Free *
 * Software Foundation, either version 3 of the License, or any later version.*
 *                                                                            *
 * This program is distributed in the hope that it will be useful, but        *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
 * for more details. (http://www.gnu.org/licenses/)                           *
 * -------------------------------------------------------------------------- */

namespace RSIM{

class SystemData;

/** 
This class can be used to obtain custom data from the integrator. A user defined class can be added
to an object of the class Integrator using the function Integrator::addReporter(). 
*/
class Reporter{
        public:
                /** 
                Reporter cannot modify the system or the state. 
                @param report_interval is the interval at which custom data is to be obtained during integration.
                */
                Reporter(const SystemData& Data,
                         const double& report_interval);
                
                /** This function is called every ReportInterval_ time by the integrator.*/
                virtual void report()const=0;
                
                const double& getReportInterval()const;                
        protected:
                const SystemData& Data_;                
                const double& ReportInterval_;
        private:
                Reporter(const Reporter&);
                
}; // class Reporter
}// namespace RSIM

#endif